package java19;

public abstract class Sharp {

    //抽象方法
    public abstract void print();
}
 class Cycle extends  Sharp {
    @Override
    public void print() {
        System.out.println("○");
    }
}
 class Flower extends Sharp{
    @Override
    public void print() {
        System.out.println("✿");
    }
}
class Triangle extends Sharp{
    @Override
    public void print() {
        System.out.println("△");
    }
}
  class test {
    public static void main(String[] args)
    {
        fun(new Cycle());
        fun(new Flower());
        fun(new Triangle());
    }
    //使用者
   static  void fun(Sharp sharp)
    {
        sharp.print();
    }

}

